package com.kaoyaya.delivery.fragment;

import com.kaoyaya.delivery.activity.R;

import android.view.LayoutInflater;
import android.view.View;
import android.widget.ImageView;
import android.widget.TextView;

public class SideBarCategory extends SideBarItem{

	private View view;
	
	public SideBarCategory(String fmtTag, LayoutInflater inflater, int drawableId, String name) {
		super(fmtTag);
		initView(inflater, drawableId, name);
	}
	
	public void initView(LayoutInflater inflater, int drawableId, String name) {
		View mView = inflater.inflate(R.layout.sidebar_category, null);
		ImageView ivCategory = (ImageView) mView.findViewById(R.id.iv_category);
		TextView tvTitle = (TextView) mView.findViewById(R.id.tv_title);
		ivCategory.setImageResource(drawableId);
		tvTitle.setText(name);
		view = mView;
	}

	@Override
	public View getView() {
		return view;
	}
	
}
